package com.zxy.ziems.server.statistics.constants;

public class Constants {

    public enum TechnologyPanelEnum {
        ALL(0, "全部"),
        ENERGY(1, "能源"),
        PRODUCTION_LINE(2, "产线"),
        DEVICE(3, "设备"),
        UNIT(4, "单元"),
        ;

        private Integer code;

        private String desc;

        TechnologyPanelEnum(Integer code, String desc) {
            this.code = code;
            this.desc = desc;
        }

        public static TechnologyPanelEnum getByCode(Integer code) {
            for (TechnologyPanelEnum value : values()) {
                if (value.getCode().equals(code)) return value;
            }
            return null;
        }

        public Integer getCode() {
            return code;
        }

        public String getDesc() {
            return desc;
        }
    }
    public enum HomologyTypeEnum {
        ON_YEAR(0, "同比"),
        LINK(1, "环比"),
        ;

        private Integer code;

        private String desc;

        HomologyTypeEnum(Integer code, String desc) {
            this.code = code;
            this.desc = desc;
        }

        public static HomologyTypeEnum getByCode(Integer code) {
            for (HomologyTypeEnum value : values()) {
                if (value.getCode().equals(code)) return value;
            }
            return null;
        }

        public Integer getCode() {
            return code;
        }

        public String getDesc() {
            return desc;
        }
    }
}
